<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta content="phalconplus API doc" name="description">
    <title>
                    phalconplus API Documentation
            </title>
    <link rel="stylesheet" type="text/css" href="../../../asset/static/prettify.css" />

<script src="../../../asset/static/prettify.js"></script>
<script src="../../../asset/api_definition.js"></script>


                        <link rel="stylesheet" type="text/css" href="../../../asset/static/prettify.css" />
                    <link rel="stylesheet" type="text/css" href="../../../asset/static/zephir-theme.css" />
            
    

                        <script src="../../../asset/static/prettify.js"></script>
                                    <script src="../../../asset/api_definition.js"></script>
                    <script src="../../../asset/static/jquery.min.js"></script>
                    <script src="../../../asset/static/zephir-doc.js"></script>
                <script>var ZepCurrentPath = '../../../'</script>
    </head>
 <body onload="prettyPrint()">
        <div id="top-bar">
            <div id="top-left">
                                    phalconplus Documentation <span class="version">v1.0.0-alpha</span>
                            </div>
            <div id="top-right">
            </div>
        </div>
        <div id="body">
            <div id="body-left">
                <div class="header-search">
                    <input class="search-box" placeholder="Search for a class or namespace " type="text" />
                    <div id="menu-wrapper">
                    </div>
                </div>
            </div>
            <div id="body-right">
                <div class="content">
                    
<div class="breadcrumb">
    
    <ul>
        
        <li><a href="../../../index.html">Home</a></li>
        
                <li><a href="../../../classes.html">Classes</a></li>
                <li><a >PhalconPlus\Base\Model</a></li>
                
    </ul>
    
</div>
<div class="class-header clearfix">
    
    
    <div class="access-buttons">
        <a class="zep-button" href="../../../source/PhalconPlus/Base/Model.html">Source</a>

            </div>
    
    <div class="class-full-name">
        
        <span class="class-type">Class</span>
        
                <span class="namespace-piece">
            <a href="../../../namespace/PhalconPlus.html">PhalconPlus</a>
        </span>
                <span class="namespace-piece">
            <a href="../../../namespace/PhalconPlus/Base.html">Base</a>
        </span>
                <h1 class="class-name">Model</h1>
    </div>

</div>


<div class="hidden-anchor"  id="methods"></div>
<div class="methods-summary standard-bandeau">Methods</div>
<ul class="method-summary-list">
    
        
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <span class="method-name"><a href="#method-details-initialize">initialize</a></span>()
            <span class="method-return">
                &nbsp;<strong>:</strong>&nbsp;
                                    void
                            </span>
        </div>
            </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <span class="method-name"><a href="#method-details-getMessage">getMessage</a></span>()
            <span class="method-return">
                &nbsp;<strong>:</strong>&nbsp;
                                    void
                            </span>
        </div>
            </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <span class="method-name"><a href="#method-details-getFirstMessage">getFirstMessage</a></span>()
            <span class="method-return">
                &nbsp;<strong>:</strong>&nbsp;
                                    void
                            </span>
        </div>
            </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <span class="method-name"><a href="#method-details-getLastMessage">getLastMessage</a></span>()
            <span class="method-return">
                &nbsp;<strong>:</strong>&nbsp;
                                    void
                            </span>
        </div>
            </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <span class="method-name"><a href="#method-details-createBuilder">createBuilder</a></span>(<span class="param-data-type">string</span> <span class="variable param-name">$alias</span>)
            <span class="method-return">
                &nbsp;<strong>:</strong>&nbsp;
                                    Phalcon\Mvc\Model\Query\BuilderInterface                            </span>
        </div>
            </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <span class="method-name"><a href="#method-details-getInstance">getInstance</a></span>()
            <span class="method-return">
                &nbsp;<strong>:</strong>&nbsp;
                                    Phalcon\Mvc\Model                            </span>
        </div>
                    <div class="method-doc">
                <div class="summary-text">
                                    </div>
            </div>
            </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <span class="method-name"><a href="#method-details-newInstance">newInstance</a></span>()
            <span class="method-return">
                &nbsp;<strong>:</strong>&nbsp;
                                    Phalcon\Mvc\Model                            </span>
        </div>
            </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <span class="method-name"><a href="#method-details-batchInsert">batchInsert</a></span>(<span class="param-data-type">array</span> <span class="variable param-name">$columns</span>, <span class="param-data-type">array</span> <span class="variable param-name">$rows</span>)
            <span class="method-return">
                &nbsp;<strong>:</strong>&nbsp;
                                    void
                            </span>
        </div>
            </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <span class="method-name"><a href="#method-details-beforeValidationOnCreate">beforeValidationOnCreate</a></span>()
            <span class="method-return">
                &nbsp;<strong>:</strong>&nbsp;
                                    void
                            </span>
        </div>
            </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <span class="method-name"><a href="#method-details-afterFetch">afterFetch</a></span>()
            <span class="method-return">
                &nbsp;<strong>:</strong>&nbsp;
                                    void
                            </span>
        </div>
            </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <span class="method-name"><a href="#method-details-beforeCreate">beforeCreate</a></span>()
            <span class="method-return">
                &nbsp;<strong>:</strong>&nbsp;
                                    void
                            </span>
        </div>
            </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <span class="method-name"><a href="#method-details-beforeSave">beforeSave</a></span>()
            <span class="method-return">
                &nbsp;<strong>:</strong>&nbsp;
                                    void
                            </span>
        </div>
            </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <span class="method-name"><a href="#method-details-findByPagable">findByPagable</a></span>(<span class="param-data-type">variable</span> <span class="variable param-name">$pagable</span>, <span class="param-data-type">array</span> <span class="variable param-name">$params</span>)
            <span class="method-return">
                &nbsp;<strong>:</strong>&nbsp;
                                    void
                            </span>
        </div>
                    <div class="method-doc">
                <div class="summary-text">
                    find with paginator                </div>
            </div>
            </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <span class="method-name"><a href="#method-details-exists">exists</a></span>()
            <span class="method-return">
                &nbsp;<strong>:</strong>&nbsp;
                                    bool                            </span>
        </div>
                    <div class="method-doc">
                <div class="summary-text">
                    Check if a reord is already exists?                </div>
            </div>
            </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <span class="method-name"><a href="#method-details-setUpdateCond">setUpdateCond</a></span>(<span class="param-data-type">array</span> <span class="variable param-name">$params</span>)
            <span class="method-return">
                &nbsp;<strong>:</strong>&nbsp;
                                    void
                            </span>
        </div>
                    <div class="method-doc">
                <div class="summary-text">
                    如果想在更新某条记录的时候额外加入其他条件，可以使用此方法                </div>
            </div>
            </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <span class="method-name"><a href="#method-details-setUniqueKeys">setUniqueKeys</a></span>(<span class="param-data-type">array</span> <span class="variable param-name">$whereUk</span>)
            <span class="method-return">
                &nbsp;<strong>:</strong>&nbsp;
                                    void
                            </span>
        </div>
                    <div class="method-doc">
                <div class="summary-text">
                                    </div>
            </div>
            </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <span class="method-name"><a href="#method-details-setUqKeys">setUqKeys</a></span>(<span class="param-data-type">array</span> <span class="variable param-name">$whereUk</span>)
            <span class="method-return">
                &nbsp;<strong>:</strong>&nbsp;
                                    void
                            </span>
        </div>
                    <div class="method-doc">
                <div class="summary-text">
                    columnMap field                </div>
            </div>
            </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <span class="method-name"><a href="#method-details-_p_buildUkCond">_p_buildUkCond</a></span>(<span class="param-data-type">variable</span> <span class="variable param-name">$metaData</span>, <span class="param-data-type">variable</span> <span class="variable param-name">$connection</span>)
            <span class="method-return">
                &nbsp;<strong>:</strong>&nbsp;
                                    void
                            </span>
        </div>
            </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <span class="method-name"><a href="#method-details-toProtoBuffer">toProtoBuffer</a></span>(<span class="param-data-type">variable</span> <span class="variable param-name">$columns</span>)
            <span class="method-return">
                &nbsp;<strong>:</strong>&nbsp;
                                    <a href='../../../class/PhalconPlus/Base/ProtoBuffer.html'>PhalconPlus\Base\ProtoBuffer</a>                            </span>
        </div>
            </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <span class="method-name"><a href="#method-details-getReadConnection">getReadConnection</a></span>()
            <span class="method-return">
                &nbsp;<strong>:</strong>&nbsp;
                                    <a href='../../../class/PhalconPlus/Base/AdapterInterface.html'>PhalconPlus\Base\AdapterInterface</a>                            </span>
        </div>
                    <div class="method-doc">
                <div class="summary-text">
                    Gets the connection used to read data for the model                </div>
            </div>
            </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="method-summary">
        <div class="method-signature">
            <span class="method-name"><a href="#method-details-zephir_init_properties_PhalconPlus_Base_Model">zephir_init_properties_PhalconPlus_Base_Model</a></span>()
            <span class="method-return">
                &nbsp;<strong>:</strong>&nbsp;
                                    void
                            </span>
        </div>
            </div>
</li>

    </ul>

<div class="hidden-anchor"  id="methods-details"></div>
<div class="methods-summary standard-bandeau">Methods Details</div>
<ul class="method-details-list">
    
        
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-initialize"></div>
    <div class="method-details">
        <div class="method-details-details">
            <div class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                <span class="keyword">function</span>&nbsp;<span class="method-name">initialize</span>()
            </div>
            <div class="method-doc">
                            </div>
        </div>
    </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-getMessage"></div>
    <div class="method-details">
        <div class="method-details-details">
            <div class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                <span class="keyword">function</span>&nbsp;<span class="method-name">getMessage</span>()
            </div>
            <div class="method-doc">
                            </div>
        </div>
    </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-getFirstMessage"></div>
    <div class="method-details">
        <div class="method-details-details">
            <div class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                <span class="keyword">function</span>&nbsp;<span class="method-name">getFirstMessage</span>()
            </div>
            <div class="method-doc">
                            </div>
        </div>
    </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-getLastMessage"></div>
    <div class="method-details">
        <div class="method-details-details">
            <div class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                <span class="keyword">function</span>&nbsp;<span class="method-name">getLastMessage</span>()
            </div>
            <div class="method-doc">
                            </div>
        </div>
    </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-createBuilder"></div>
    <div class="method-details">
        <div class="method-details-details">
            <div class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                <span class="keyword">function</span>&nbsp;<span class="method-name">createBuilder</span>(<span class="param-data-type">string</span> <span class="variable param-name">$alias</span>)
            </div>
            <div class="method-doc">
                            </div>
        </div>
    </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-getInstance"></div>
    <div class="method-details">
        <div class="method-details-details">
            <div class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                    <span class="visibility-static keyword">static</span>
                                <span class="keyword">function</span>&nbsp;<span class="method-name">getInstance</span>()
            </div>
            <div class="method-doc">
                                    <div class="summary">
                                            </div>
                    <div class="description">
                                            </div>
                            </div>
        </div>
    </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-newInstance"></div>
    <div class="method-details">
        <div class="method-details-details">
            <div class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                    <span class="visibility-static keyword">static</span>
                                <span class="keyword">function</span>&nbsp;<span class="method-name">newInstance</span>()
            </div>
            <div class="method-doc">
                            </div>
        </div>
    </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-batchInsert"></div>
    <div class="method-details">
        <div class="method-details-details">
            <div class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                    <span class="visibility-static keyword">static</span>
                                <span class="keyword">function</span>&nbsp;<span class="method-name">batchInsert</span>(<span class="param-data-type">array</span> <span class="variable param-name">$columns</span>, <span class="param-data-type">array</span> <span class="variable param-name">$rows</span>)
            </div>
            <div class="method-doc">
                            </div>
        </div>
    </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-beforeValidationOnCreate"></div>
    <div class="method-details">
        <div class="method-details-details">
            <div class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                <span class="keyword">function</span>&nbsp;<span class="method-name">beforeValidationOnCreate</span>()
            </div>
            <div class="method-doc">
                            </div>
        </div>
    </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-afterFetch"></div>
    <div class="method-details">
        <div class="method-details-details">
            <div class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                <span class="keyword">function</span>&nbsp;<span class="method-name">afterFetch</span>()
            </div>
            <div class="method-doc">
                            </div>
        </div>
    </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-beforeCreate"></div>
    <div class="method-details">
        <div class="method-details-details">
            <div class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                <span class="keyword">function</span>&nbsp;<span class="method-name">beforeCreate</span>()
            </div>
            <div class="method-doc">
                            </div>
        </div>
    </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-beforeSave"></div>
    <div class="method-details">
        <div class="method-details-details">
            <div class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                <span class="keyword">function</span>&nbsp;<span class="method-name">beforeSave</span>()
            </div>
            <div class="method-doc">
                            </div>
        </div>
    </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-findByPagable"></div>
    <div class="method-details">
        <div class="method-details-details">
            <div class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                <span class="keyword">function</span>&nbsp;<span class="method-name">findByPagable</span>(<span class="param-data-type">variable</span> <span class="variable param-name">$pagable</span>, <span class="param-data-type">array</span> <span class="variable param-name">$params</span>)
            </div>
            <div class="method-doc">
                                    <div class="summary">
                        find with paginator                    </div>
                    <div class="description">
                        - params["columns"]
        - params["conditions"]
        - params["bind"]
        - params["hydration"]: \Phalcon\Mvc\Model\Resultset::HYDRATE_OBJECTS | HYDRATE_ARRAYS | HYDRATE_RECORDS                    </div>
                            </div>
        </div>
    </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-exists"></div>
    <div class="method-details">
        <div class="method-details-details">
            <div class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                <span class="keyword">function</span>&nbsp;<span class="method-name">exists</span>()
            </div>
            <div class="method-doc">
                                    <div class="summary">
                        Check if a reord is already exists?                    </div>
                    <div class="description">
                                            </div>
                            </div>
        </div>
    </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-setUpdateCond"></div>
    <div class="method-details">
        <div class="method-details-details">
            <div class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                <span class="keyword">function</span>&nbsp;<span class="method-name">setUpdateCond</span>(<span class="param-data-type">array</span> <span class="variable param-name">$params</span>)
            </div>
            <div class="method-doc">
                                    <div class="summary">
                        如果想在更新某条记录的时候额外加入其他条件，可以使用此方法                    </div>
                    <div class="description">
                        where = [
         'id > ?',  // 占位符仅支持?形式，不支持:placeHolder这种形式
         'bind' => [
             14
         ]
     ];                    </div>
                            </div>
        </div>
    </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-setUniqueKeys"></div>
    <div class="method-details">
        <div class="method-details-details">
            <div class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                <span class="keyword">function</span>&nbsp;<span class="method-name">setUniqueKeys</span>(<span class="param-data-type">array</span> <span class="variable param-name">$whereUk</span>)
            </div>
            <div class="method-doc">
                                    <div class="summary">
                                            </div>
                    <div class="description">
                                            </div>
                            </div>
        </div>
    </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-setUqKeys"></div>
    <div class="method-details">
        <div class="method-details-details">
            <div class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                <span class="keyword">function</span>&nbsp;<span class="method-name">setUqKeys</span>(<span class="param-data-type">array</span> <span class="variable param-name">$whereUk</span>)
            </div>
            <div class="method-doc">
                                    <div class="summary">
                        columnMap field                    </div>
                    <div class="description">
                                            </div>
                            </div>
        </div>
    </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-_p_buildUkCond"></div>
    <div class="method-details">
        <div class="method-details-details">
            <div class="method-signature">
                                    <span class="visibility-protected keyword">protected</span>
                                <span class="keyword">function</span>&nbsp;<span class="method-name">_p_buildUkCond</span>(<span class="param-data-type">variable</span> <span class="variable param-name">$metaData</span>, <span class="param-data-type">variable</span> <span class="variable param-name">$connection</span>)
            </div>
            <div class="method-doc">
                            </div>
        </div>
    </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-toProtoBuffer"></div>
    <div class="method-details">
        <div class="method-details-details">
            <div class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                <span class="keyword">function</span>&nbsp;<span class="method-name">toProtoBuffer</span>(<span class="param-data-type">variable</span> <span class="variable param-name">$columns</span>)
            </div>
            <div class="method-doc">
                            </div>
        </div>
    </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-getReadConnection"></div>
    <div class="method-details">
        <div class="method-details-details">
            <div class="method-signature">
                                    <span class="visibility-public keyword">public</span>
                                <span class="keyword">function</span>&nbsp;<span class="method-name">getReadConnection</span>()
            </div>
            <div class="method-doc">
                                    <div class="summary">
                        Gets the connection used to read data for the model                    </div>
                    <div class="description">
                        Check transaction in writeConnection before `_transaction`                    </div>
                            </div>
        </div>
    </div>
</li>

    
        
<li class="class-method clearfix">
    <div class="hidden-anchor" id="method-details-zephir_init_properties_PhalconPlus_Base_Model"></div>
    <div class="method-details">
        <div class="method-details-details">
            <div class="method-signature">
                                    <span class="visibility-internal keyword">internal</span>
                                <span class="keyword">function</span>&nbsp;<span class="method-name">zephir_init_properties_PhalconPlus_Base_Model</span>()
            </div>
            <div class="method-doc">
                            </div>
        </div>
    </div>
</li>

    </ul>                </div>
            </div>
        </div>
    </body>
</html>
